<template>
  <body>
  <div>
    <Header></Header>
    <TeacherMenu></TeacherMenu>
    <router-view></router-view>
  </div>
  </body>
</template>

<script>
import Header from '../common/Header'
import TeacherMenu from './TeacherMenu'

export default {
  name: 'TeacherIndex',
  components: {Header, TeacherMenu},
  data () {
    return {
      notifyForm: {
        id: '',
        acc: '',
        type: '',
        title: '',
        bz: '',
        fbsj: '',
        enabled: '',
        discordTo: {
          id: '',
          name: ''
        }
      }
    }
  },
  mounted () {
    this.$axios.get('/teacher/notify').then(resp => {
      this.$notify({
        title: resp.data.title,
        message: resp.data.bz,
        duration: 0, // 停留时长
        type: this.notifyForm.type === 300 ? 'info' : 'warning',
        offset: 200,
        position: 'bottom-left'
      })
    })
  }
}
</script>

<style scoped>
body {
  background-color: #d9d9f1;
}
</style>
